package net.vsame.url2sql.domain;

import java.lang.reflect.Method;

/**
 * 路径配置
 * @author <a href="mailto:gaollg@sina.com">Gaollg</a>
 * @data 2013-5-6
 *
 */
public class UrlConfig {
	
	private String url;
	
	@Deprecated
	private String sql;
	private String v;//校验
	private String js;//脚本
	private int status = 1;//状态
	//仅为扩展实现
	private Class<?> clazz;
	private Method method;
	private String desc;//描述
	
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		if(!url.startsWith("/")){
			url = "/" + url;
		}
		this.url = url;
	}
	@Deprecated
	public String getSql() {
		return sql;
	}
	@Deprecated
	public void setSql(String sql) {
		this.sql = sql;
	}
	public String getV() {
		return v;
	}
	public void setV(String v) {
		this.v = v;
	}
	public String getJs() {
		return js;
	}
	public void setJs(String js) {
		this.js = js;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public Class<?> getClazz() {
		return clazz;
	}
	public void setClazz(Class<?> clazz) {
		this.clazz = clazz;
	}
	public Method getMethod() {
		return method;
	}
	public void setMethod(Method method) {
		this.method = method;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	@Override
	public String toString() {
		return "UrlConfig [url=" + url + ", sql=" + sql + ", v=" + v + ", js="
				+ js + ", status=" + status + ", clazz=" + clazz + ", method="
				+ method + "]";
	}
	
}
